package com.teamwork.module03.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.teamwork.common.entity.module03.Article;
import com.teamwork.common.entity.module03.requestentity.ReqArticleBody;
import com.teamwork.common.result.Result;

import javax.servlet.http.HttpServletResponse;
import java.io.FileNotFoundException;
import java.util.List;

public interface ArticleService extends IService<Article> {
    Result getArticles(Integer page, Integer size,String searchname);

    Result getArticleById(Integer id);

    Result getTxt(String name, HttpServletResponse response) throws FileNotFoundException;

    Result getArticlesInManger(ReqArticleBody reqBody);

    Result checkArticle(Integer id,Integer status);


    Result deleteOne(Integer id);

    Result deleteBuch(List<Integer> ids);

     boolean deleteByAuId(Integer authorid);

     Result getArticlesByAuthorId(Long authorid);

    List<Article> getArtListByAuId(Integer authorid);

    void addCommentCount(int aid);

    Result tocareArticle(Integer userid, Integer artid);

    Result getArticleCareStatus(Integer userid, Integer artid);

    Result delcareArticle(Integer userid, Integer artid);

    Result tolikeArticle(Integer userid, Integer artid);

    Result delLikeArticle(Integer userid, Integer artid);

    Result getLikeArtStatus(Integer userid, Integer artid);

    List<Article> getArtArdyPubByUId(Integer userid);

    Result getMyArticles(Integer userid);

    Result getMyStars(Integer userid);
}
